{extend name='Public:content'/}
{block name='title'}角色管理{/block}
{block name='content'}
<div class="row animated fadeIn">
    <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#tab-first" role="tab" data-toggle="tab">角色列表
                        <button class="btn btn-success btn-rounded btn-sm">{$role_nums}</button>
                    </a></li>
                    <li><a href="#tab-second" role="tab" data-toggle="tab">角色添加</a></li>
                </ul>
                <div class="panel-body tab-content">
                    <div class="alert alert-info" role="alert">
                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <strong>温馨提醒！</strong>点击编辑按钮,进行权限分配
                    </div>
                    <div class="tab-pane active" id="tab-first">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>角色名称</th>
                                <th>角色描述</th>
                                <th>创建时间</th>
                                <th>更新时间</th>
                                <th>状态</th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name='role_list' id='v'}
                            <tr class="del_tr">
                                <td>{$v.name}</td>
                                <td>{$v.remark}</td>
                                <td>{$v.create_time|tranTime}</td>
                                <td>{$v.update_time|tranTime}</td>
                                <td>{$v.status|is_stop}</td>
                                <td>
                                    <a title="{$v.name}【编辑】" data-url="{:url('admin/Role/edit_page',['id'=>$v.id])}" onclick="edit_row(this)"  class="btn btn-default btn-rounded btn-sm"><span class="fa fa-pencil"></span></a>
                                    <button data-url="{:url('admin/Role/del_think',['id'=>$v.id])}" onClick="delete_row(this);" class="btn btn-danger btn-rounded btn-sm" ><span class="fa fa-trash-o"></span></button>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {$pages}
                    </div>
                    <div class="tab-pane" id="tab-second">
                        <form id="add_form" action="{:url('admin/Role/add_think')}" method="post" class="form-horizontal">
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-md-10">
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">角色名称</label>
                                            <div class="col-md-9">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                                    <input type="text" name="name" class="form-control"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">备注</label>
                                            <div class="col-md-9 col-xs-12">
                                                <textarea class="form-control" name="remark" rows="5"></textarea>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3  control-label">是否通过</label>
                                            <div class="col-md-9">
                                                <label class="switch">
                                                    <input type="checkbox" name="status" checked value="1"/>
                                                    <span class="help-block"></span>
                                                </label>
                                                <span class="help-block">默认正常</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="panel-footer">
                                <button class="btn btn-info pull-right">保存修改<span class="fa fa-floppy-o fa-right"></span></button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
</script>
{/block}